package com.flyxteam.commons.httpclient;

/**
 * <b>功能：</b>{@link HttpClientConfig}快速工厂类.<br>
 * 
 * new HttpClientConfigs().charset("UTF-8")<br>
 * 
 * <b>Copyright TCSL</b>
 * <ul>
 * <li>版本&nbsp;&nbsp;&nbsp;&nbsp;修改日期&nbsp;&nbsp;&nbsp;&nbsp;部　　门&nbsp;&nbsp;&nbsp;&nbsp;作　者&nbsp;&nbsp;&nbsp;&nbsp;变更内容</li>
 * <hr>
 * <li>v1.0&nbsp;&nbsp;&nbsp;&nbsp;20150706&nbsp;&nbsp;技术中心&nbsp;&nbsp;&nbsp;&nbsp;刘庆魁&nbsp;&nbsp;&nbsp;&nbsp;创建类</li>
 * </ul>
 */
public class HttpClientConfigs {
	
	/** 默认空对象 */
	private HttpClientConfig config = new HttpClientConfig();
	
	/**
	 * 设置字符集编码.
	 */
	public HttpClientConfigs charset(String charset){
		config.setCharset(charset);
		return this;
	}
	
	/**
	 * 设置超时,秒.
	 */
	public HttpClientConfigs timeoutSecond(int second){
		config.setConnectTimeout(second);
		return this;
	}
	
	/**
	 * 返回配置实体.
	 */
	public HttpClientConfig getConfig(){
		return config;
	}
}
